import axios from "axios";
const request = axios.create({
    baseURL:'http://localhost:8888',
    timeout:5000
})
request.interceptors.request.use(config=>{
    config.headers['token'] = localStorage.getItem('token') || '';
   return config
},error=>{
    return Promise.reject(error)
}
)
request.interceptors.response.use(
    response=>{
        return response
    },
    error=>{
        console.log('err'+error);
        return Promise.reject(error)
    }
)
export default request